package com.ay277.htqoa.staff.entity;

import com.ay277.htqoa.base.entity.BaseEntity;

import javax.persistence.*;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.HashSet;
import java.util.Set;

/**
 * Created by accp09 on 2016/12/7.
 */
@Entity
@Table(name = "tb_Dept")
public class Dept extends BaseEntity {
    //部门名称
    private String name;
    //部门介绍信息
    private String info;
    private Set<Emp> emps = new HashSet<Emp>() ;
    @OneToMany(cascade=CascadeType.ALL)
    @JoinColumn(name = "deptid")
    public Set<Emp> getEmps() {
        return emps;
    }

    public void setEmps(Set<Emp> emps) {
        this.emps = emps;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
